package com.itheima.controller;

import com.itheima.pojo.*;
import com.itheima.service.ReportService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author liuyp
 * @since 2025/7/24
 */
@RestController
@RequestMapping("/report")
public class ReportController {
    @Resource
    private ReportService reportService;

    @GetMapping("/empJobData")
    public Result empJobData(){
        EmpJobData data = reportService.empJobData();
        return Result.success(data);
    }

    @GetMapping("/empGenderData")
    public Result empGenderData(){
        List<EmpGender> list = reportService.empGenderData();
        return Result.success(list);
    }

    @GetMapping("/studentDegreeData")
    public Result studentDegreeData(){
        List<StudentDegree> list = reportService.studentDegreeData();
        return Result.success(list);
    }

    @GetMapping("/studentCountData")
    public Result studentCountData(){
        StudentCountData data = reportService.studentCountData();
        return Result.success(data);
    }
}
